package com.eastedu.controller;

import com.eastedu.data.RequestParameter;
import com.eastedu.domain.ObjectValueModel;
import com.eastedu.superise.handler.ppt.PptVideoHistoricalDataHandler;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpEntity;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhangzhishuai
 */
@RestController
@RequiredArgsConstructor
@RequestMapping(value = "/api/v1/ppt-video/data-update")
public class PptVideoDataUpdateController {


    private final PptVideoHistoricalDataHandler pptVideoHistoricalDataHandler;


    /**
     * 更新映射关系
     * @param parameter RequestParameter
     * @return ObjectValueModel
     */
    @PostMapping("/mappings")
    public HttpEntity<ObjectValueModel<Boolean>> updateApplyUserId(@RequestBody RequestParameter parameter) {
        pptVideoHistoricalDataHandler.start(parameter);
        return ResponseEntity.ok(new ObjectValueModel<>(Boolean.TRUE));
    }

}
